#pragma once
#include "sensordatainput.h"
#include "ImageDenoise.h"
#include "PatternCalibrationProcess.h"

typedef std::vector< std::pair < double, int > > DepthUnit;

class SensorDataProcessedInput : public SensorDataInput
{
public:

	SensorDataProcessedInput (SensorDataInput *origInput);

	~SensorDataProcessedInput ();

	virtual bool grabFrame ();

	virtual void calibration ();

	virtual SensorParameter& getSensorParameter ();
	virtual const SensorParameter& getSensorParameter () const;

private:

	SensorDataInput *_origInput;
	PatternCalibrationProcess *_calibration;
	ImageDenoise _imageDenoise;
	IplImage *_tempDepthImage;
	DepthUnit _depthUnits[480][640];

	void _updateVoxel ();
	void _generateDepthImage ();

};

